package com.ptswitch.material.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.ptswitch.material.model.contract.ContractInvoice;

public interface ContractInvoiceMapper {
    @Select("select * from contractInvoice where id=#{id}")
    ContractInvoice findById(@Param("id") long id);

    @Insert("insert into contractInvoice(askerName,contractId,contractCode,hadInvoice,invoiceType"//
            + ",paymentId,paymentCurrent,reciverName,remark,senderName)"//
            + "values() returning id")
    long add(ContractInvoice invoice);
}
